package org.dbrd.textelements;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

import org.dbrd.preprocessor.Preprocessor;
import org.dbrd.preprocessor.filters.AbstractWordFilter;

public class StemmerTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
//		Stemmer s = new Stemmer();
//		String string = "compliance";
//		s.add(string.toCharArray(), string.length());
//		s.stem();
//		System.out.println(s.toString());
		
		
		String string = "scandinavic vowels 'ä', 'å' &amp; 'ö' in folder or file name crash OOo";
		List<String> words = new LinkedList<String>();
		words.add(string);
		List<String> result = new ArrayList<String>();
		for (AbstractWordFilter filter : Preprocessor.SUMMARY_FILTERS) {
			result.clear();
			for (String word : words) {
				result.addAll(Arrays.asList(filter.process(word)));
			}
			words.clear();
			words.addAll(result);
		}
		StringBuilder builder = new StringBuilder();
		for (String word : result) {
			builder.append(word).append(" ");
		}
		System.out.println(builder);
	}

}
